package com.andnnl.act;

import act.Act;
import act.inject.DefaultValue;
import act.util.Output;
import org.osgl.mvc.annotation.GetAction;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by chenss on 2019/11/29.
 */
public class TestApp {
    public static void main(String[] args) throws Exception {
        Act.start();
    }

    @GetAction
    public void home(@DefaultValue("World") @Output String who) {
        System.out.println(".........dddd");

    }

    @GetAction("test1")
    public String test1(@DefaultValue("sxxxx222") @Output String who) {
        System.out.println(".........ddddtset133333333");
        return who;
    }

//    @GetAction({"test2"})
    @GetAction("test2/{who}")
//    @ResponseContentType(H.MediaType.JSON)
    public Object test2(@DefaultValue("sxxxx33222") @Output String who) {
        System.out.println(".........ddddtset25555");
        Map map = new HashMap();
        map.put("test", who);
        return map;
    }
}
